home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / hardware / cpu115 / cpu.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-27  |  983 b   |  30 lines

  1. /* ------------------------------------------------------------------------- *
  2.  * CPU.C  Sample program demonstrating usage of TMi0SDGL(tm) routines        *
  3.  *                                          *
  4.  * Copyright(c) 1994,95 by B-coolWare.  Written by Bobby Z.             *
  5.  * ------------------------------------------------------------------------- *
  6.  * files needed to build project:
  7.    CPU.C
  8.    CPUTYPE.C
  9.    CPU_HL.ASM
  10.    CPUSPEED.ASM
  11.    SMM.ASM
  12. */
  13.  
  14. #include <stdio.h>
  15. #include "cputype.h"
  16.  
  17. char* SMM[2] = {"","  [System Management Mode available]"};
  18.  
  19. void main()
  20. {
  21.  puts("CPU Type Identifier/C  Version 1.15   Copyright(c) 1992-95 by B-coolWare.\n");
  22.  
  23.  /* due to parameters passing convention CPU_Speed() routine will be called
  24.     first, when _CPU is not yet defined. So we should call cpuType_Str
  25.     before invoking CPU_Speed() */
  26.  printf("  Processor: %s, ",cpuType_Str());
  27.  printf("%dMHz%s\n",intCPU_Speed(),SMM[isSMMAble()]);
  28.  printf("Coprocessor: %s\n",fpuType_Str());
  29. }
  30.